/*
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: Apache-2.0
*/
@use '../internal/styles' as styles;
@use '../internal/styles/tokens' as tokens;

.stack {
  > .animation-running > .item,
  > .animation-running > .flash-list-item,
  > .animation-running.notification-bar {
    @include styles.with-motion {
      transition-timing-function: tokens.$motion-easing-responsive;
      transition-duration: tokens.$motion-duration-responsive;
    }
  }
  > .collapsed.animation-ready > .expanded-only,
  > .collapsed.animation-running > .expanded-only {
    // When collapsing, hide the exiting items right away, otherwise our animation calculations will be off
    // because of React Transition keeping the elements in the DOM for a bit longer.
    display: none;
  }
}
